/**
 * @file     AnalyzeStructuresInline.h
 * @brief    Inline definitions for AnalyzeStructures interface.
 *
 * @author   Franco Riberi
 * @email    fgriberi AT gmail.com
 *
 * Contents: Header file for titere providing AnalyzeStructureInline functions.
 *
 * System:   titere: Target Ideal TEmperature Rna Expression
 * Language: C++
 *
 * @date January 8, 2014
 *
 * Copyright (C) 2014 Franco Riberi, FuDePAN
 *
 * This file is part of the titere.
 *
 * Titere is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Titere is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with titere. If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef ANALYZE_STRUCTURES_INLINE_H
#error Internal header file, DO NOT include this.
#endif

/** @brief Get the sequence name
 *
 * @param description  Description of fasta file
 * @param name file    To fill with the sequence name
 */
static inline void getDescriptionName(const std::string& description, std::string& name)
{
    std::stringstream ss(description);
    SplitContainer result;
    ss >> mili::Separator(result, '|');
    name = (result.size() > SEQ_NAME) ? result[SEQ_NAME] : description;
}

